<div class="buttons">
    <a href="<?php echo url('plan/new'); ?>">Add</a>
</div>
<table>
    <thead>
	<tr>
	    <th>序号</th>
	    <th>名称</th>
	    <th>书名</th>
	    <th>起始于</th>
	    <th>结束于</th>
	    <th>添加时间</th>
	    <th>操作</th>
	</tr>
    </thead>
    <tfoot></tfoor>
    <tbody>
	<?php foreach ($plans as $key => $plan): ?>
    	<tr class="<?php echo $key % 2 ? 'odd' : ''; ?>">
    	    <td><?php echo $plan['id']; ?></td>
    	    <td><?php echo $plan['name']; ?></td>
    	    <td><?php echo $plan['book_name']; ?></td>
    	    <td><?php echo date('Y/m/d', $plan['start']); ?></td>
    	    <td><?php echo date('Y/m/d', $plan['end']); ?></td>
    	    <td><?php echo date('Y/m/d', $plan['created_at']); ?></td>
    	    <td>
    		<a href="<?php echo url('plan/delete/' . $plan['id']); ?>">Del</a>
    		<a href="<?php echo url('plan/edit/' . $plan['id']); ?>">Edit</a>
		<a href="<?php echo url('note/index/'.$plan['id']);?>">note</a>
    	    </td>
    	</tr>
	<?php endforeach; ?>
    </tbody>
</table>